package groupby.persistence;

import groupby.model.Category;
import groupby.model.Groupby;
import groupby.util.Pages;

import java.util.List;

import user.model.UserDetial;

public interface GroupbyDao {

	public void save(Groupby groupby);
/**
 * 获得当天列表
 * @return
 */
	public List getGroupbyList( String title, String dateDate, String endDate,String categoryId,final Pages page,int cityId);
/**
 * 获得排行
 * @return
 */
   public List getBeforeList(String id);
   /**
    * 删除groupby
    * @param id
    * @return
    */
   public boolean delete(String id);
   /**
    * 获得groupby Category
    * @param pages
    * @return
    */
  public List getCategory(Pages pages,String flag);
  /**
	 * 添加category
	 * @param category
	 * @return
	 */
public boolean add(Category category);
/**
 * 修改category
 * @param category
 * @return
 */
public boolean edit(Category category);
/**
 * 删除category
 * @param id
 * @return
 */
public boolean deleteCategory(String id);
/**
 * 获得 category id
 * @return
 */
public List getSelectList(String flag);
/**
 * 修改groupby category
 * @param id
 * @param categoryId
 * @return
 */
public boolean updateGroupby(String id, String categoryId);
/**
 * 
 * 获得单个 category by id
 * @param categoryId
 * @return
 */
public Category findCategoryById(Integer categoryId);
/**
 * 获得所有category list 
 * @return
 */
public List getCategoryAll(int flag);
/**
 * 获得未结束的团购
 * @param pages
 * @return
 */
public List getGroupbyTodayListAll(Pages pages,String cityId,String categoryId,String keyword,String sortFlag);
/**
 * top
 * @param id
 * @return
 */
public int getTop(String id);
/**
 * 获得感兴趣的团购
 * 
 * @param tags
 * @return
 */
List getLikeGroupby(String tags,int city);
/**
 * 获得单个团购
 * @param groupbyId
 * @return
 */
public Groupby criticismGroupbyId(int groupbyId);
/**
 * 获得团购用户信息
 * @param username
 * @param pages
 * @param city
 * @param categoryId
 * @param sort
 * @return
 */
public List getGroupbyTodayListAll(String username, Pages pages, 
		String categoryId, String sort,String keyword,int cityId);
/**
 *  评论团购用户
 * @param groupbyUserId
 * @return
 */
public UserDetial criticismGroupbyUserId(int groupbyUserId);
/**
 * 获得往期团购
 * @param pages
 * @return
 */
public List oldGroupbyList(Pages pages,int cityId,String website,String cIdStr);
/**
 * 获得往期团购
 * @param page
 * @param cityId
 * @return
 */
public List oldGroupbyListByPage(String categoryId, String keyword,String startTime,String endTime, String sort,Pages page, int cityId,String username);
/**
 * 获得团购用户的团购活动
 * @param pages
 * @param username
 * @return
 */
public List myGroupby(Pages pages,final String keyword,final String sort, String username,int cityId);
/**
 * 获得我的团购团购活动
 * @param pages
 * @param username
 * @return
 */
public List oldGroupbyListByPage(String keyword, String startTime,
		String endTime, String sort, Pages page, String username);
/**
 * 获得相同团购
 * @param text
 * @return
 */
public boolean isFindGroupby(String text,int cityId);

}
